#pragma once

#include <Arduino.h>

/*RTC*/
#include "PCF8563.h"
extern RTC_PCF8563 rtc;
void PCF8563_Task(void*arg);
void Set_Time(void*arg);

/*温湿度*/
#define TEMP_AND_HUMI_FUNCTION

#ifdef TEMP_AND_HUMI_FUNCTION
#include "SHT30.h"
extern SHT30_DEVICE SHT30;
void SHT30_Task(void*arg);
#endif // TEMP_AND_HUMI_FUNCTION


/*光照*/
#include "My_ADC.h"
extern My_ADC ADC_Light;
void ADC_Task(void*arg);

/*按键*/
#include "My_Button.h"
#define DelayTime   20  //按键延时
extern GPIO_Button Button1;
void Button_Task(void *arg);


/*LED*/
#include "LED.h"
extern GPIO_LED LED_1;
extern GPIO_LED ScreenPower;
void LED_Task(void *arg);


/*屏幕*/
void max7219_power_off();



extern bool Lamp_auto;
extern bool Button1_flag;
extern bool Fade_auto;
extern bool Connected_fl;
extern bool Connected_st;
extern bool ScreenPower_st;
extern uint8_t GuiNum;


#ifdef SCREEN_OLD_VERSION
    #define MOSI    4
    #define MISO    -1
    #define SCLK    6  
    #define SS      -1
    #define CS      5
#else
    #define MOSI    6
    #define MISO    -1
    #define SCLK    7     
    #define SS      -1
    #define CS      8
#endif


#define anzMAX     4     
#define ROTATE_90